package com.cyz.web.app.combination;


/**
 * 组合模式 作为容器和内容的抽象类型
 */
public abstract class Component {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Component(String name) {
        this.name = name;
    }


    public abstract void add(Component component);

    public abstract void remove(Component component);

    public abstract void display(int depth);
}

